import { getRecycleFilesListReturnValue } from "@/types/recycle";
import http from "@/utils/axios";

/**
 * 获取回收站文件列表
 * @param data 页码,分页大小
 * @returns
 */
export const getRecycleFilesListAPI = (data: {
  pageNo: string;
  pageSize: string;
}) =>
  http<getRecycleFilesListReturnValue>({
    url: "",
    method: "POST",
    data,
  });

/**
 * 恢复文件
 * @param data 所选文件ID
 * @returns
 */
export const recoveryFileAPI = (data: { fileIds: string }) =>
  http<any>({
    url: "/recycle/recoverFile",
    method: "POST",
    data,
  });

/**
 * 彻底删除文件
 * @param data 所选文件ID
 * @returns 
 */
export const deleteFileCompletelyAPI = (data: { fileIds: string }) =>
  http<any>({
    url: "/recycle/delFile",
    method: "POST",
    data,
  });
